<template>
  <div class="">
    <div class="login">
      <div class="log_siz">BK管理系统</div>
      <div class="ipt">
        用户名:
        <el-input v-model="form.loginName" placeholder="请输入内容"></el-input>
        密码:
        <el-input v-model="form.loginKey" placeholder="请输入内容"></el-input>
      </div>

      <div class="login_footer">
        <el-button @click="onsubmit" type="primary">登录</el-button>
        <el-button type="warning">清空</el-button>
        <el-button type="text">新用户注册</el-button>
      </div>
    </div>
  </div>
</template>

<script>


export default {
  data() {
    return {
      form: {},
      maps:{
  admin: "管理员",
  editor: "编辑者",
  user: "普通用户",
}

    };
  },
  methods: {
    async onsubmit() {
      await this.$store.dispatch("users/doLogin", this.form);

      this.$router.push("/");
    },
  },
};
</script>

<style scoped>
.login {
  width: 300px;
  height: 250px;
  margin: 0 auto;
  border: 1px solid;
}

.log_siz {
  font-size: 20px;
}

.ipt {
  width: 250px;
  margin-top: 5px;
}

.login_footer {
  margin-top: 20px;
  margin-left: 20px;
}
</style>